Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: useCachedQueryProvider to ensure required data is loaded for rendering #2940

Merged
merged 17 commits into from
Oct 23, 2023

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented Aug 28, 2023

By using the CachedQueryProvider we get the following benefits:

  1. Remove SystemSettingsProvider and UserSettingsProvider
  2. loading status is handled so maps components don't need to check if systemSettings or userSettings are loaded
  3. Stores the basemaps and layerTypes in its state so they can be removed from maps redux (these lists don't change during the user session - so redux is overkill)

Notes:

  • Cypress tests have been added that check some of the systemSettings and userSettings
  • The only change in most of the 'Select' components is that the nameProperty comes from the CachedQueryProvider instead of the User/SystemSettingsProvider
  • AppWrapper and App are simplified since 'loading' doesn't need to be checked

This work is being done now to simplify implementing the routing

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Aug 28, 2023

🚀 Deployed on https://pr-2940--dhis2-maps.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify August 28, 2023 12:21 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 28, 2023 12:49 Inactive
@jenniferarnesen jenniferarnesen marked this pull request as draft August 28, 2023 12:55
@jenniferarnesen jenniferarnesen self-assigned this Aug 28, 2023
@cypress
Copy link

cypress bot commented Aug 28, 2023

2 flaky tests on run #2635 ↗︎

0 43 16 0 Flakiness 2

Details:

Merge d95bf93 into 02b5f73...
Project: maps Commit: 0defbcd17a ℹ️
Status: Passed Duration: 06:23 💡
Started: Oct 22, 2023 8:28 AM Ended: Oct 22, 2023 8:34 AM
Flakiness  layers/thematiclayer.cy.js • 1 flaky test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Thematic Layers > adds a thematic layer with split view period Output Screenshots
Flakiness  dataDownload.cy.js • 1 flaky test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Data Download > downloads data from a thematic layer Output Screenshots

Review all test suite changes for PR #2940 ↗︎

@dhis2-bot dhis2-bot temporarily deployed to netlify August 28, 2023 13:07 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 31, 2023 09:23 Inactive
@jenniferarnesen jenniferarnesen force-pushed the chore/useQueryCacheProvider branch from 87cfb56 to 3b5c6fa Compare August 31, 2023 13:53
@dhis2-bot dhis2-bot temporarily deployed to netlify August 31, 2023 13:57 Inactive
@jenniferarnesen jenniferarnesen force-pushed the chore/useQueryCacheProvider branch from f92133c to 72a1b04 Compare September 26, 2023 12:39
@dhis2-bot dhis2-bot temporarily deployed to netlify September 28, 2023 09:31 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2023 07:50 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2023 11:28 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2023 13:32 Inactive
@jenniferarnesen jenniferarnesen marked this pull request as ready for review September 29, 2023 13:37
@dhis2-bot dhis2-bot temporarily deployed to netlify September 29, 2023 14:27 Inactive
Copy link
Contributor

@turban turban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Approved with two small comments.

I've tested the Maps app without finding any issues. I have not tested the plugin, but the code changes looks fine to me.

src/constants/settings.js Outdated Show resolved Hide resolved
src/components/layers/basemaps/BasemapList.js Outdated Show resolved Hide resolved
@dhis2-bot dhis2-bot temporarily deployed to netlify October 5, 2023 14:21 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 21, 2023 10:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify October 22, 2023 07:08 Inactive
@jenniferarnesen jenniferarnesen merged commit 921863a into dev Oct 23, 2023
11 checks passed
@jenniferarnesen jenniferarnesen deleted the chore/useQueryCacheProvider branch October 23, 2023 07:27
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants